﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WpfApp1.Contexts;
using WpfApp1.Models;

namespace WpfApp1.Services
{
    public class UserServiceImpl : IUserService
    {
        public User getUser(string UserName)
        {
            using(MyDbContext ctx = new MyDbContext())
            {
                User user = ctx.Users.Single(u => u.UserName.Equals(UserName));
                return user;
            }
        }
    }
}
